import axios from '@/request'

export function getCouponListApi(page) {
  return axios.get(`/admin/coupon/${page}`)
}

export function createCouponApi(data) {
  return axios.post('/admin/coupon', data)
}

export function updateCouponApi(id, data) {
  return axios.post('/admin/coupon/' + id, data)
}

export function deleteCouponApi(id) {
  return axios.post(`/admin/coupon/${id}/delete`)
}

export function updateCouponStatusApi(id) {
  return axios.post(`/admin/coupon/${id}/update_status`, {
    status: 0,
  })
}
